import { ResPage, ResultData, TrainPlan } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 培训方案模块
 */
// 获取培训方案列表
export const getTrainPlanList = (params: TrainPlan.ReqTrainPlanParams) => {
  return http.post<ResPage<TrainPlan.ResTrainPlanList>>(`/electcollect/trainPlan/query`, params);
};
// 获取装置表号列表
export const getStationNoList = (params: TrainPlan.ReqStationNoParams) => {
  return http.post<TrainPlan.ResStationNoList>(`/electcollect/trainPlan/stationNoQuery`, params);
};
// 新增培训方案
export const addTrainPlan = (params = {}) => {
  return http.post(`/electcollect/trainPlan/add`, params);
};
// 编辑培训方案
export const editTrainPlan = (params: { planId: number }) => {
  return http.post(`/electcollect/trainPlan/modify`, params);
};

// 删除培训方案
export const deleteTrainPlan = (params: { planList: { planId: number }[] }) => {
  return http.post(`/electcollect/trainPlan/remove`, params);
};

// 培训方案详情
export const getTrainPlanDtl = (params: { planId: number }) => {
  return http.post<ResultData>(`/electcollect/trainPlan/detail`, params);
};

// 试题选择列表
export const getQuestionSelList = (params = {}) => {
  return http.post(`/electcollect/trainPlan/questionSelectionQuery`, params);
};
